import 'package:mall/modules/model/goods_entity.dart';

import 'package:json_annotation/json_annotation.dart';

part 'search_goods_entity.g.dart';

@JsonSerializable()
class SearchGoodsEntity {
  int? total;
  int? pages;
  int? limit;
  int? page;
  List<GoodsEntity>? xList;
  List<SearchGoodsFiltercategorylist>? filterCategoryList;

  SearchGoodsEntity({
    this.total,
    this.pages,
    this.limit,
    this.page,
    this.xList,
    this.filterCategoryList,
  });

  factory SearchGoodsEntity.fromJson(Map<String, dynamic> json) => _$SearchGoodsEntityFromJson(json);

  Map<String, dynamic> toJson() => _$SearchGoodsEntityToJson(this);
}

@JsonSerializable()
class SearchGoodsFiltercategorylist {
  String? picUrl;
  bool? deleted;
  String? keywords;
  String? addTime;
  String? level;
  int? sortOrder;
  String? name;
  int? pid;
  String? updateTime;
  int? id;
  String? iconUrl;
  String? desc;

  SearchGoodsFiltercategorylist({
    this.picUrl,
    this.deleted,
    this.keywords,
    this.addTime,
    this.level,
    this.sortOrder,
    this.name,
    this.pid,
    this.updateTime,
    this.id,
    this.iconUrl,
    this.desc,
  });

  factory SearchGoodsFiltercategorylist.fromJson(Map<String, dynamic> json) => _$SearchGoodsFiltercategorylistFromJson(json);

  Map<String, dynamic> toJson() => _$SearchGoodsFiltercategorylistToJson(this);
}